﻿CREATE TABLE [dbo].[Customer] (
    [CustomerId] [uniqueidentifier] NOT NULL,
    [CustomerCode] [nvarchar](10),
    [IdNumber] [nvarchar](10),
    [IdIssuer] [nvarchar](255),
    [IdIssuedDate] [datetime] NOT NULL,
    [FirstName] [nvarchar](255),
    [LastName] [nvarchar](255),
    [Birthday] [datetime] NOT NULL,
    [Gender] [int] NOT NULL,
    [Title] [nvarchar](max),
    [CustomerType] [int] NOT NULL,
    [MemberSince] [datetime] NOT NULL,
    [Telephone] [nvarchar](15),
    [CellPhone] [nvarchar](15),
    [Fax] [nvarchar](15),
    [CreatedDate] [datetime] NOT NULL,
    [UpdatedDate] [datetime] NOT NULL,
    [CreatedBy] [uniqueidentifier],
    [UpdatedBy] [uniqueidentifier],
    [IsDeleted] [bit] NOT NULL,
    [Version] rowversion NOT NULL,
    CONSTRAINT [PK_dbo.Customer] PRIMARY KEY ([CustomerId])
)
CREATE TABLE [dbo].[__MigrationHistory] (
    [MigrationId] [nvarchar](255) NOT NULL,
    [Model] [varbinary](max) NOT NULL,
    [ProductVersion] [nvarchar](32) NOT NULL,
    CONSTRAINT [PK_dbo.__MigrationHistory] PRIMARY KEY ([MigrationId])
)
BEGIN TRY
    EXEC sp_MS_marksystemobject 'dbo.__MigrationHistory'
END TRY
BEGIN CATCH
END CATCH